package top.aigoo.project01.entity.dto;

import top.aigoo.project01.entity.Product;
import top.aigoo.project01.entity.ProductCategory;
import top.aigoo.project01.enums.ProductStateEnum;

import java.util.List;

/**
 * @Description: 商品
 * @Author: Mr.OYSHUO.欧阳大叔  mail:1642302522@qq.com
 * @Version 1.0.0
 * @Date: 2021/8/27 22:50
 */
public class ProductExecution {
    //状态
    private int state;
    //结果
    private String stateInfo;
    // 分类数量
    private int count;

    private Product product;

    private List<Product> productList;

    /*无参构造*/
    public ProductExecution() {
    }

    public ProductExecution(ProductStateEnum stateEnum) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
    }
    /*构造器，传递增、删、改结果*/
    public ProductExecution(ProductStateEnum stateEnum, Product product) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
        this.product = product;
    }
    /*构造器, 传递查询列表*/
    public ProductExecution(ProductStateEnum stateEnum, List<Product> productList) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
        this.productList = productList;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public List<Product> getProductList() {
        return productList;
    }

    public void setProductList(List<Product> productList) {
        this.productList = productList;
    }
}
